﻿<UserControl
    x:Name="MyCompenentSelector"
    x:Class="Dicide.Views.CompenentSelector"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Dicide.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Border
        Background="{StaticResource ApplicationPressedForegroundThemeBrush}">
        <Border
            Margin="2"
            Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
            <ScrollViewer
                HorizontalScrollMode="Auto"
                VerticalScrollMode="Disabled">
                <GridView
                    x:Name="MyGridView"
                    SelectionMode="Single"
                    IsItemClickEnabled="False"
                    Margin="5"
                    MaxHeight="200"
                    CanReorderItems="True"
                    SelectionChanged="GridViewSelectionChanged"
                    ItemsSource="{Binding ElementName=MyCompenentSelector, Path=Components}">
                    <GridView.ItemTemplate>
                        <DataTemplate>
                            <ContentPresenter Margin="5" Content="{Binding}"/>
                        </DataTemplate>
                    </GridView.ItemTemplate>
                </GridView>
            </ScrollViewer>
        </Border>
    </Border>
</UserControl>
